<template>
  <div class="home">
    <div class="head">
      <ul class="nav">
        <li @click="gotoPage()">中文</li>
        <li class="active">English</li>
      </ul>
      <div class="logo"><img src="@/assets/images/logo.png"/>Lucky Meow</div>
<!--      <div class="loglist"><span>Lucky Meow 1.1.1 for Windows Newly Released  </span> <span>06-19</span></div>-->
<!--      <div class="showMore">More ></div>-->
      <ul class="typelist">
        <li @click="down('Android')">
          <div class="icon"><img src="@/assets/images/Android.png"/></div>
          <div class="text">Android</div>
        </li>
        <li @click="down('iOS')">
          <div class="icon"><img src="@/assets/images/ios.png"/></div>
          <div class="text">iOS<br/> coming soon</div>
        </li>
      </ul>
    </div>
    <div class="content-big">
      <div class="ul-item">
        <div class="li">
          <img src="@/assets/images/1.png"/>
          <div class="content">Redefine Second-hand Trading</div>
        </div>
        <div class="li">
          <img src="@/assets/images/5.png"/>
          <div class="content">Low Listing Fee, No Additional Charges</div>
        </div>
      </div>
      <div class="contentList">
        <div class="li">
          <img src="@/assets/images/8.png"/>
          <div class="content">Promote Your Items</div>
        </div>
        <div class="li">
          <img src="@/assets/images/6.png"/>
          <div class="content">Intuitive Trading Experience</div>
        </div>
        <div class="li">
          <img src="@/assets/images/2.png"/>
          <div class="content">Secured Transactions</div>
        </div>
        <div class="li">
          <img src="@/assets/images/7.png"/>
          <div class="content">WeChat Pay Accepted</div>
        </div>
      </div>
    </div>
    <div class="aboutUs-big">
      <img src="@/assets/images/bg.png"/>
      <div class="aboutUs">
        <div class="title">Lucky Meow LTD</div>
        <div class="aboutUsContent"><strong>About us</strong><br/>
          Lucky Meow LTD focuses on bringing an innovative business model and new technologies to the C2C second-hand trading market to provide an easy and safe online trading environment for customers and traders. Users are encouraged to buy, sell, and trade their pre-owned items, reducing waste and fostering a circular economy.
        </div>
      </div>
    </div>
    <div class="footer">
      <ul>
        <li>
          <img src="@/assets/images/footer1.png"/>
          <div>
            <p>Term of service</p>
            <p style="cursor: pointer" @click="goToExternalSite">View relevant information</p>
          </div>
        </li>
        <li>
          <img src="@/assets/images/footer2.png"/>
          <div>
            <p>Contact Us</p>
            <p>+44 7482072161</p>
          </div>
        </li>
        <li>
          <img src="@/assets/images/footer3.png"/>
          <div>
            <p>official email</p>
            <p>hello@luckymeow.co.uk</p>
          </div>
        </li>
      </ul>
    </div>
  </div>

</template>

<script>
import '@/assets/styles/common.scss'
import {reqDownloadlink} from "@/api/agreement";

export default {
  data() {
    return {};
  },
  components: {},
  mounted() {

  },
  methods: {
    goToExternalSite() {
      const routeData = this.$router.resolve({
        path: '/agreement',
      });
      window.open(routeData.href, '_blank');
    },
  down(type) {
      if (type == 'Android') {
        reqDownloadlink().then(res => {
          console.log('获取下载链接', res.data);
          const fileUrl = res.data; // 文件的URL地址
          const link = document.createElement('a');
          link.href = fileUrl;
          link.setAttribute('download', type);
          link.click();

        })
      } else {
        this.$message({
          message: '这个应用还没有上线哦!',
          type: 'warning'
        });
      }

    },
    gotoPage() {
      this.$router.push({
        path: 'index'
      })
    },
  },
};
</script>

<style lang="scss" scoped>

</style>
